$(document).ready(function () {

    $('#OrderSameaddress').click(function () {
        if ($('#OrderSameaddress').attr("checked", "checked")) {
            $('#OrderShippingAddress').val($('#ClientBillingAddress').val());
            $('#OrderShippingAddress2').val($('#ClientBillingAddress2').val());
            $('#OrderShippingCity').val($('#ClientBillingCity').val());
            $('#OrderShippingState').val($('#ClientBillingState').val());
            $('#OrderShippingZip').val($('#ClientBillingZip').val());
            $('#OrderShippingCountry').val($('#ClientBillingCountry').val());
        } else {
            $("#OrderShippingAddress").val('');
            $('#OrderShippingAddress2').val('');
            $('#OrderShippingCity').val('');
            $('#OrderShippingState').val('');
            $('#OrderShippingZip').val('');
            $('#OrderShippingCountry').val('');
        }

    });

});
